package com.project.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 商品实体类
 */
@TableName("t_product")
public class ProductBean {
    /**
     * 商品ID
     */
    @TableId(value = "pk_productId")
    private String id;
    /**
     * 商品名称
     */
    @TableField("p_name")
    private String name;
    /**
     * 建议销售价
     */
    @TableField("p_sellPrice")
    private Integer sellPrice;
    /**
     * 最新采购价
     */
    @TableField("p_buyPrice")
    private Integer buyPrice;
    /**
     * 商品类别
     */
    @TableField("p_type")
    private String type;
    /**
     * 库存数量
     */
    @TableField("p_saveNumber")
    private int saveNumber;
    /**
     * 图片路径
     */
    @TableField("p_picture")
    private String picture;

    public ProductBean(String productName, int sellPrice, int buyPrice, String productType, int saveNumber, String picture) {
        this.name = productName;
        this.sellPrice = sellPrice;
        this.buyPrice = buyPrice;
        this.type = productType;
        this.saveNumber = saveNumber;
        this.picture = picture;
    }

    public ProductBean() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSellPrice() {
        return sellPrice;
    }

    public void setSellPrice(Integer sellPrice) {
        this.sellPrice = sellPrice;
    }

    public Integer getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(Integer buyPrice) {
        this.buyPrice = buyPrice;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSaveNumber() {
        return saveNumber;
    }

    public void setSaveNumber(int saveNumber) {
        this.saveNumber = saveNumber;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sellPrice=" + sellPrice +
                ", buyPrice=" + buyPrice +
                ", type='" + type + '\'' +
                ", saveNumber=" + saveNumber +
                ", picture='" + picture + '\'' +
                "}\n";
    }
}
